lectures.alex.balgavy.eu

Lecture notes from university.
git clone git://git.alex.balgavy.eu/lectures.alex.balgavy.eu.git
Log | Files | Refs | Submodules

Parallel programming.html (1693B)


      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      3 <html><head><link rel="stylesheet" href="sitewide.css" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><meta name="exporter-version" content="Evernote Mac 6.13.1 (455785)"/><meta name="altitude" content="0.0130038158968091"/><meta name="author" content="Alex Balgavy"/><meta name="created" content="2017-12-20 9:35:34 PM +0000"/><meta name="latitude" content="52.37351692179788"/><meta name="longitude" content="4.836244283666336"/><meta name="source" content="desktop.mac"/><meta name="updated" content="2017-12-20 9:42:16 PM +0000"/><title>Parallel programming</title></head><body><div><div><div><b>Thread creation</b><br/></div></div></div>how do we make processors participate in parallel execution?<br/><div><br/></div><div>when a single processor runs a program, there is one active thread of execution control</div><div>for a parallel program, you need independent tasks handled separately by multiple threads of execution control (one for each processor)</div><div>these threads are created explicitly, e.g. using a create_thread routine in a parallel programming library</div><div><br/></div><div><b>Thread synchronisation</b></div><div>how do we ensure that each processor finishes its task before the final result is computed?</div><div><br/></div><div>several methods, usually implemented in library routines</div><div>e.g. barrier — force threads to wait until they all have reached a specific point in the program where there is a call to the barrier routine</div><div><br/></div></body></html>